<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>event高德地图</title>
	<style>
		*{margin:0;padding:0;}
		#container,#container1,#container2{width:800px; min-height:500px;float:left;margin:10px;height:100%;}
	    .taiwan{ border: solid 1px red; color: red; float: left; width: 80px; background-color: rgba(255,0,0,0.1) }
	    .amap-marker .amap-marker-label{line-height:30px;height:30px;background: rgba(0,0,0,0.5);border:0;padding:5px;font-size: 24px;border-radius: 5px;}
	    /*#container1{display:none;}*/

	</style>
	<!-- <script src="http://webapi.amap.com/maps?v=1.4.0&key=68f1f7850d75a2c422f417cc77331395&plugin=AMap.DragRoute"></script> -->
	<script src="http://webapi.amap.com/maps?v=1.3&key=68f1f7850d75a2c422f417cc77331395&plugin=AMap.DragRoute"></script>
</head>
<body>
	<div id="container"></div>
	<div id="container1"></div>
	<div id="tip"></div>
</body>
</html>
<script>
	var provinces = [
		{ "name": "北京市", "center": "116.405285,39.904989", "type": 0, "subDistricts": [] }, 
		{ "name": "天津市", "center": "117.190182,39.125596", "type": 1, "subDistricts": [] }, 
		{ "name": "河北省", "center": "114.502461,38.045474", "type": 1, "subDistricts": [] }, 
		{ "name": "山西省", "center": "112.549248,37.857014", "type": 1, "subDistricts": [] }, 
		{ "name": "内蒙古自治区", "center": "111.670801,40.818311", "type": 1, "subDistricts": [] }, 
		{ "name": "辽宁省", "center": "123.429096,41.796767", "type": 1, "subDistricts": [] }, 
		{ "name": "吉林省", "center": "125.3245,43.886841", "type": 1, "subDistricts": [] }, 
		{ "name": "黑龙江省", "center": "126.642464,45.756967", "type": 1, "subDistricts": [] }, 
		{ "name": "上海市", "center": "121.472644,31.231706", "type": 1, "subDistricts": [] }, 
		{ "name": "江苏省", "center": "118.767413,32.041544", "type": 1, "subDistricts": [] }, 
		{ "name": "浙江省", "center": "120.153576,30.287459", "type": 1, "subDistricts": [] }, 
		{ "name": "安徽省", "center": "117.283042,31.86119", "type": 1, "subDistricts": [] }, 
		{ "name": "福建省", "center": "119.306239,26.075302", "type": 1, "subDistricts": [] }, 
		{ "name": "江西省", "center": "115.892151,28.676493", "type": 1, "subDistricts": [] }, 
		{ "name": "山东省", "center": "117.000923,36.675807", "type": 1, "subDistricts": [] }, 
		{ "name": "河南省", "center": "113.665412,34.757975", "type": 1, "subDistricts": [] }, 
		{ "name": "湖北省", "center": "114.298572,30.584355", "type": 1, "subDistricts": [] }, 
		{ "name": "湖南省", "center": "112.982279,28.19409", "type": 1, "subDistricts": [] }, 
		{ "name": "广东省", "center": "113.280637,23.125178", "type": 1, "subDistricts": [] }, 
		{ "name": "广西壮族自治区", "center": "108.320004,22.82402", "type": 1, "subDistricts": [] }, 
		{ "name": "海南省", "center": "110.33119,20.031971", "type": 1, "subDistricts": [] }, 
		{ "name": "重庆市", "center": "106.504962,29.533155", "type": 1, "subDistricts": [] }, 
		{ "name": "四川省", "center": "104.065735,30.659462", "type": 1, "subDistricts": [] }, 
		{ "name": "贵州省", "center": "106.713478,26.578343", "type": 1, "subDistricts": [] }, 
		{ "name": "云南省", "center": "102.712251,25.040609", "type": 1, "subDistricts": [] }, 
		{ "name": "西藏自治区", "center": "91.132212,29.660361", "type": 1, "subDistricts": [] }, 
		{ "name": "陕西省", "center": "108.948024,34.263161", "type": 1, "subDistricts": [] }, 
		{ "name": "甘肃省", "center": "103.823557,36.058039", "type": 1, "subDistricts": [] }, 
		{ "name": "青海省", "center": "101.778916,36.623178", "type": 1, "subDistricts": [] }, 
		{ "name": "宁夏回族自治区", "center": "106.278179,38.46637", "type": 1, "subDistricts": [] }, 
		{ "name": "新疆维吾尔自治区", "center": "87.617733,43.792818", "type": 1, "subDistricts": [] }, 
		{ "name": "台湾省", "center": "121.509062,25.044332", "type": 2, "subDistricts": [] }, 
		{ "name": "香港特別行政區", "center": "114.173355,22.320048", "type": 1, "subDistricts": [] }, 
		{ "name": "澳門特別行政區", "center": "113.54909,22.198951", "type": 1, "subDistricts": [] }
	];


/**

*************************	Marker 类  *****************************

****  子类 AMap.Marker 


	1. map : Map 要显示该marker的地图对象 
	2. position : LngLat 点标记在地图上显示的位置，默认为地图中心点，[ 确定需要标记的位置坐标 ]
	3. offset : Pixel 点标记显示位置偏移量，默认值为Pixel(-10,-34)。
			Marker指定position后，默认以marker左上角位置为基准点，对准所给定的position位置，
			若需使marker指定位置对准在position处，需根据marker的尺寸设置一定的偏移量。
			需要使用  AMap.Pixel 类
	4. icon : String/Icon 需在点标记中显示的图标。可以是一个本地图标地址，或者Icon对象。有合法的content内容时，此属性无效 (暂时不清楚为什么地图发生变化会消失)

	5. content : String/Object 点标记显示内容，可以是HTML要素字符串或者HTML DOM对象。content有效时，icon属性将被覆盖 (暂时不清楚为什么地图发生变化会消失)

	6. topWhenClick : Boolean 鼠标点击时 marker 是否置顶，默认false ，不置顶 (不清楚如何使用)

	7. bubble : Boolean 是否将覆盖物的鼠标或 touch 等事件冒泡到地图上 （自v1.3 新增） 默认值：false (不清楚如何使用)
	
	8. draggable : Boolean 设置点标记是否可拖拽移动，默认为false。[标记的是点的位置，可拖动的范围有限]
	
	9. raiseOnDrag ：Boolean 设置拖拽点标记时是否开启点标记离开地图的效果 [ 暂不清楚如何使用 ]
	
	10. cursor ：String 指定鼠标悬停时的鼠标样式，自定义 cursor，IE仅支持 cur/ani/ico 格式，Opera不支持自定义cursor
	
	11. visible ：Boolean 点标记是否可见，默认为true [marker是否可见]
	
	12. zIndex ：Number 点标记的叠加顺序。地图上存在多个点标记叠加时，通过该属性使级别较高的点标记在上层显示 默认zIndex：100

	13. angle : Number 点标记的旋转角度，广泛用于改变车辆行驶方向 注：angle属性是使用CSS3来实现的，支持IE9及以上版本[ 标记的旋转角度 ]

	14. autoRotation ：Boolean 是否自动旋转。点标记在使用moveAlong动画时，路径方向若有变化，点标记是否自动调整角度，默认为false。
			广泛用于自动调节车辆行驶方向。 IE8以下不支持旋转，autoRotation属性无效
	15. animation ：String 	点标记的动画效果，默认值： "AMAP_ANIMATION_NONE" 
		可选值： "AMAP_ANIMATION_NONE"，无动画效果 "AMAP_ANIMATION_DROP"，点标掉落效果 "AMAP_ANIMATION_BOUNCE"，点标弹跳效果
	16. shadow : Icon 点标记阴影，不设置该属性则点标记无阴影, new AMap.Icon() [在使用时只对点标记，若自定义图片则不起作用]

****  子类 AMap.Icon

	1. size : Size 	图标尺寸，默认值(36,36)
	2. imageOffset : Pixel 图标取图偏移量。当image中指定了一个大图时，可通过size和imageOffset配合，显示图标的指定范围[ 图片相对于图标的偏移量 ]
	3. image : String 图标的取图地址。默认为蓝色图钉图片
	4. imageSize : Size 图标所用图片大小，根据所设置的大小拉伸或压缩图片，等同于CSS中的background-size属性。可用于实现高清屏的高清效果

****  子类 AMap.Polyline 
****  子类 AMap.Polygon 
****  子类 AMap.Circle
****  子类 AMap.GroundImage
****  子类 AMap.ContextMenu




	





*/


	var map = new AMap.Map('container',{
		resizeEnable:true,
	});
	var map1 = new AMap.Map('container1',{
		resizeEnable:true,
	});
	map.setCenter([116.405285,39.904989]);
	map1.setCenter([116.405285,39.904989]);

	var maker1 = new AMap.Marker({
		map : map,
		position : [ 116.405285, 39.904989 ],
		icon : new AMap.Icon({
			image : '1.jpg',
			size : [100,200]
		}),
		label : { content : '当前位置', offset : new AMap.Pixel(20,-20) },
		// offset : new AMap.Pixel(20,20),
		topWhenClick : true,
		draggable : false,
		zIndex : 20,
		title : '哈哈哈，就知道',
		clickable : false, // 是否可点击
	});

	var maker2 = new AMap.Marker({
		map : map1,
		position : [ 116.405285, 39.904989 ],
		draggable : true,
		label : { content : '我是一个map', offset : new AMap.Pixel(20,20) },
		cursor : 'move',
		zIndex : 20,
		angle : 20,
		raiseOnDrag : false,
	});
	// console.log(maker2.F.label);

	maker1.on('click',function( e ){
		alert(123)
		maker1.topWhenClick = true;
		// console.log(123)
	})




   











	








	
</script>
